import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.tsx'
import './index.scss'
import 'amfe-flexible'

const baseSize = 16

function setRem(){
  const scale = document.documentElement.clientWidth / 1920;
  // 设置页面根节点字体大小
  document.documentElement.style.fontSize =
      baseSize * Math.min(scale, 2) + "px";
}

setRem();
// 改变窗口大小时重新设置 rem
window.onresize = function () {
    setRem();
};



ReactDOM.createRoot(document.getElementById('root')!).render(
  // <React.StrictMode>
    <App />
  // </React.StrictMode>,
)
